home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / C / Applications / Tcl-Tk 8.0 / Pre-installed version / tcl8.0 / compat / dlfcn.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-08-15  |  1.7 KB  |  66 lines  |  [TEXT/CWIE]

  1. /* 
  2.  * dlfcn.h --
  3.  *
  4.  *    This file provides a replacement for the header file "dlfcn.h"
  5.  *    on systems where dlfcn.h is missing.  It's primary use is for
  6.  *    AIX, where Tcl emulates the dl library.
  7.  *
  8.  *    This file is subject to the following copyright notice, which is
  9.  *    different from the notice used elsewhere in Tcl but rougly
  10.  *    equivalent in meaning.
  11.  *
  12.  *    Copyright (c) 1992,1993,1995,1996, Jens-Uwe Mager, Helios Software GmbH
  13.  *    Not derived from licensed software.
  14.  *
  15.  *    Permission is granted to freely use, copy, modify, and redistribute
  16.  *    this software, provided that the author is not construed to be liable
  17.  *    for any results of using the software, alterations are clearly marked
  18.  *    as such, and this notice is not modified.
  19.  *
  20.  * SCCS: @(#) dlfcn.h 1.4 96/09/17 09:05:59
  21.  */
  22.  
  23. /*
  24.  * @(#)dlfcn.h    1.4 revision of 95/04/25  09:36:52
  25.  * This is an unpublished work copyright (c) 1992 HELIOS Software GmbH
  26.  * 30159 Hannover, Germany
  27.  */
  28.  
  29. #ifndef __dlfcn_h__
  30. #define __dlfcn_h__
  31.  
  32. #ifndef _TCL
  33. #include <tcl.h>
  34. #endif
  35.  
  36. #ifdef __cplusplus
  37. extern "C" {
  38. #endif
  39.  
  40. /*
  41.  * Mode flags for the dlopen routine.
  42.  */
  43. #define RTLD_LAZY    1    /* lazy function call binding */
  44. #define RTLD_NOW    2    /* immediate function call binding */
  45. #define RTLD_GLOBAL    0x100    /* allow symbols to be global */
  46.  
  47. /*
  48.  * To be able to intialize, a library may provide a dl_info structure
  49.  * that contains functions to be called to initialize and terminate.
  50.  */
  51. struct dl_info {
  52.     void (*init) _ANSI_ARGS_((void));
  53.     void (*fini) _ANSI_ARGS_((void));
  54. };
  55.  
  56. VOID *dlopen _ANSI_ARGS_((const char *path, int mode));
  57. VOID *dlsym _ANSI_ARGS_((void *handle, const char *symbol));
  58. char *dlerror _ANSI_ARGS_((void));
  59. int dlclose _ANSI_ARGS_((void *handle));
  60.  
  61. #ifdef __cplusplus
  62. }
  63. #endif
  64.  
  65. #endif /* __dlfcn_h__ */
  66.